      SUBROUTINE SETUP
      RETURN
      END
C 
      BLOCK DATA
      INCLUDE 'BLOCO.INC'
      INTEGER I,J
      DATA NAME/'HS108RXMOD'/
      DATA (X(I),I=1,9)/9*1.D0/
      DATA N/9/ , NH/1/ , NG/28/
      DATA DEL0/1.00D0/ ,TAU0/1.00D0/ ,TAU/.1D0/
      DATA (GUNIT(1,J),J=2,19)/18*1/,(GUNIT(3,I),I=2,19)/9*-1,9*1/,
     F     (GUNIT(2,I),I=2,19)/1,2,3,4,5,6,7,8,9,
     F     1,2,3,4,5,6,7,8,9/
     F     ,((GUNIT(I,J),I=1,3),J=0,1)/-1,0,0,-1,0,0/
     F     ,((GUNIT(I,J),I=1,3),J=20,29)/-1,0,0,-1,0,0,-1,0,0,-1,0,0,
     F     -1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0/
      END
      SUBROUTINE EF(X,FX)
      INCLUDE 'FUCO.INC'
      DOUBLE PRECISION X(NX),FX
      ICF=ICF+1
      FX=-0.5D0*(X(1)*X(4)-X(2)*X(3)+X(3)*X(9)-X(5)*X(9)+X(5)*X(8)
     1   -X(6)*X(7))
      RETURN
      END
      SUBROUTINE EGRADF(X,GRADF)
      INCLUDE 'FUCO.INC'
      DOUBLE PRECISION X(NX),GRADF(NX)
      ICGF=ICGF+1
      GRADF(1)=-0.5D0*X(4)
      GRADF(2)=-0.5D0*(-X(3))
      GRADF(3)=-0.5D0*(-X(2)+X(9))
      GRADF(4)=-0.5D0*X(1)
      GRADF(5)=-0.5D0*(X(8)-X(9))
      GRADF(6)=+0.5D0*X(7)
      GRADF(7)=+0.5D0*X(6)
      GRADF(8)=-0.5D0*X(5)
      GRADF(9)=-0.5D0*(X(3)-X(5))
      RETURN
      END
      SUBROUTINE EH(I,X,HXI)
      INCLUDE 'FUCO.INC'
      INTEGER I
      DOUBLE PRECISION X(NX),HXI
      CRES(I)=CRES(I)+1
      HXI= X(9)
      RETURN
      END
      SUBROUTINE EGRADH(I,X,GRADHI)
      INCLUDE 'FUCO.INC'
      DOUBLE PRECISION X(NX),GRADHI(NX)
      INTEGER I,J
      CGRES(I)=CGRES(I)+1
      DO      100      J=1,9
      GRADHI(J)=0.D0
  100 CONTINUE
      GRADHI(9)=1.D0
      RETURN
      END
      SUBROUTINE EG(I,X,GXI)
      INCLUDE 'FUCO.INC'
      DOUBLE PRECISION X(NX),GXI
      INTEGER I,J
      IF ( GUNIT(1,I+NH) .EQ. -1 ) CRES(I+NH)=CRES(I+NH)+1
      IF(I .GT. 18)      GOTO 200
      IF(I .GT.  9)      GOTO 100
      GXI=(10.D0-X(I))
      RETURN
  100 GXI=(10.D0+X(I))
      RETURN
  200 J=I-18
      GOTO (210,230,240,250,260,270,280,290,300,330),J
  210 GXI=(1.D0 - X(3)**2 -X(4)**2)
      RETURN
  230 GXI=(1.D0 - X(5)**2-X(6)**2 )
      RETURN
  240 GXI=(1.D0 - X(1)**2-(X(2)-X(9))**2 )
      RETURN
  250 GXI=(1.D0 -(X(1)-X(5))**2-(X(2)-X(6))**2 )
      RETURN
  260 GXI=(1.D0 -(X(1)-X(7))**2-(X(2)-X(8))**2 )
      RETURN
  270 GXI=(1.D0 -(X(3)-X(5))**2-(X(4)-X(6))**2 )
      RETURN
  280 GXI=(1.D0 -(X(3)-X(7))**2-(X(4)-X(8))**2 )
      RETURN
  290 GXI=(1.D0 -X(7)**2-(X(8)-X(9))**2 )
      RETURN
  300 GXI=(X(1)*X(4)-X(2)*X(3) )
      RETURN
  330 GXI=(X(5)*X(8) - X(6)*X(7))
      END
      SUBROUTINE EGRADG(I,X,GRADGI)
      INCLUDE 'FUCO.INC'
      INTEGER I,J,K
      DOUBLE PRECISION X(NX) ,GRADGI(NX)
      DO      100      J=1,9
      GRADGI(J)=0.0D0
  100 CONTINUE
      IF(I .GT. 18)      GOTO 200
      IF(I .LE.  9)      GRADGI(I)=-1.D0
      IF(I .GT.  9)      GRADGI(I)=+1.D0
      GOTO 400
  200 K=I-18
      GOTO (210,230,240,250,260,270,280,290,300,330),K
  210 GRADGI(3)=-2.D0*X(3)
      GRADGI(4)=-2.D0*X(4)
      GOTO 400
  230 GRADGI(5)=-(X(5)+X(5))
      GRADGI(6)=-(X(6)+X(6))
      GOTO 400
  240 GRADGI(1)=-(X(1)+X(1))
      GRADGI(2)=-2.D0*(X(2)- X(9))
      GRADGI(9)=-GRADGI(2)
      GOTO 400
  250 GRADGI(1)=-2.D0*(X(1)-X(5))
      GRADGI(2)=-2.D0*(X(2)- X(6))
      GRADGI(5)=-GRADGI(1)
      GRADGI(6)=-GRADGI(2)
      GOTO 400
  260 GRADGI(1)=-2.D0*(X(1)-X(7))
      GRADGI(2)=-2.D0*(X(2)- X(8))
      GRADGI(7)=-GRADGI(1)
      GRADGI(8)=-GRADGI(2)
      GOTO 400
  270 GRADGI(3)=-2.D0*(X(3)-X(5))
      GRADGI(4)=-2.D0*(X(4)- X(6))
      GRADGI(5)=-GRADGI(3)
      GRADGI(6)=-GRADGI(4)
      GOTO 400
  280 GRADGI(3)=-2.D0*(X(3)-X(7))
      GRADGI(4)=-2.D0*(X(4)- X(8))
      GRADGI(7)=-GRADGI(3)
      GRADGI(8)=-GRADGI(4)
      GOTO 400
  290 GRADGI(7)=-(X(7)+X(7))
      GRADGI(8)=-2.D0*(X(8)- X(9))
      GRADGI(9)=-GRADGI(8)
      GOTO 400
  300 GRADGI(1)=X(4)
      GRADGI(2)=-X(3)
      GRADGI(3)=-X(2)
      GRADGI(4)= X(1)
      GOTO 400
  330 GRADGI(5)=X(8)
      GRADGI(8)=X(5)
      GRADGI(6)=-X(7)
      GRADGI(7)=-X(6)
  400 CONTINUE
      RETURN
      END


